'''
Created on Jul 26, 2011

@author: mike
'''
from View.Widgets.EntityEditor.ComponentEditor import ComponentEditor
from PyQt4 import QtCore, QtGui, Qt
from Model.EditorPath import EditorPath

class EntityDescr(ComponentEditor):
    '''
    classdocs
    '''

    def __init__(self, title="title", parent=None):
        '''
        Constructor
        '''
        ComponentEditor.__init__(self, title, parent)
        
        self.mImage         = QtGui.QImage()
        self.mImage.load(EditorPath.mImageFolderPath + EditorPath.mEntity32ImageFile)
        self.mImageHover    = QtGui.QImage()
        self.mImageHover.load(EditorPath.mImageFolderPath + EditorPath.mEntity32HoverImageFile)
        self.mImagePressed  = QtGui.QImage()
        self.mImagePressed.load(EditorPath.mImageFolderPath + EditorPath.mEntity32PressedImageFile)
        
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setMargin(0)
        self.gridLayout.setSpacing(0)
        self.setLayout(self.gridLayout)
        widget = QtGui.QWidget()
        self.lblEntityId = QtGui.QLabel()
        self.lblEntityName = QtGui.QLabel()
        
               
        self.lblEntityIdField = QtGui.QLabel()
        self.txtboxlEntityName = QtGui.QTextEdit()
        self.txtboxlEntityName.setMinimumHeight(30)
        self.txtboxlEntityName.setMaximumHeight(30)
        
        self.lblEntityId.setText("ID:")
        
        
        self.lblEntityId.setText("GUID: ")
        self.lblEntityName.setText("Name: ")
        self.gridLayout.addWidget(self.lblEntityId,0,0)
        self.gridLayout.addWidget(self.lblEntityIdField,0,1)
        self.gridLayout.addWidget(self.lblEntityName,1,0)
        
        self.gridLayout.addWidget(self.txtboxlEntityName,1,1)
        
        self.setMinimumHeight(50)
        self.setMaximumHeight(70)
        self.setMinimumWidth(100)
        
        self.mTitle = "Description"
        
        
        
        
    def setEntityGuid(self, id):
        self.lblEntityIdField.setText(id)    
    
    def setEntityName(self, entityName):
        self.txtboxlEntityName.setText(entityName)
        

             
        

        
        